package cn.edu.nju.freshdelivery.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import cn.edu.nju.freshdelivery.dao.ReplyDAO;
import cn.edu.nju.freshdelivery.model.Comment;
import cn.edu.nju.freshdelivery.model.Reply;
import cn.edu.nju.freshdelivery.service.ReplyService;

@Component
public class ReplyServiceImpl implements ReplyService {
	private ReplyDAO replyDAO;

	public ReplyDAO getReplyDAO() {
		return replyDAO;
	}

	@Resource
	public void setReplyDAO(ReplyDAO replyDAO) {
		this.replyDAO = replyDAO;
	}

	public void add(Reply reply) {
		replyDAO.save(reply);
	}
	
	public List<Reply> findByComment(Comment comment) {
		return replyDAO.findByComment(comment);
	}

}
